<?php
/**
 * @package WordPress
 * @subpackage Shining_Glow
 */

get_header();
?>
	<?php if (have_posts()) : ?>

		<h1 class="title">Search Results</h1>

		<?php while (have_posts()) : the_post(); ?>
			<div class="post">
			<h2 class="headline"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
            <h4 class="date"><?php the_time('d'); ?>&nbsp;<?php the_time('M'); ?></h4>
            <h4 class="commentnum"><?php comments_popup_link('0', '1', '%'); ?></h4>
           	<h4 class="more"><a  href="<?php the_permalink() ?>" title="Read More">Read More</a></h4>
            <div class="entry clearfix">
			<?php 
			global $mytheme;
			$image = get_post_meta($post->ID, $mytheme->option['imageThumb'], true); 
			?>
			<?php if ($image !="") : ?>
			<a class="postImage" href="<?php the_permalink() ?>"><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" /></a>
			<?php endif; ?>
			<?php the_content_rss('', TRUE, '', 100); ?>
            </div>
            </div>

		<?php endwhile; ?>

		<?php
		include('includes/wp-pagenavi.php');
		if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
		?>

	<?php else : ?>

		<h2 class="center">No posts found. Try a different search?</h2>
		<?php get_search_form(); ?>

	<?php endif; ?>
    
<?php get_sidebar(); ?>

<?php get_footer(); ?>